package ihc.terminalbanco.gui.panels;

import java.awt.BorderLayout;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.Panel;
import java.awt.event.ActionListener;

import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;

public class TerminoComprovantePane extends JPanel{

	/**
	 * 
	 */
	private static final long serialVersionUID = 822886813153816353L;

	public TerminoComprovantePane(ActionListener actionListener, Font font) {
		
		this.setLayout(new BorderLayout());

		/*
		 * Panels
		 */
						
		//CENTER

		JPanel painelCentral = new JPanel();
		painelCentral.setLayout(new GridLayout(5, 1, 10, 40));

		JLabel termino = new JLabel("Termino...");
		termino.setFont(new Font(font.getName(), Font.BOLD,	font.getSize()));
		termino.setHorizontalAlignment(SwingConstants.CENTER);
		termino.setVerticalAlignment(SwingConstants.TOP);
		painelCentral.add(termino);
		
		JLabel operacaoConcluida = new JLabel("OPERAÇÂO CONCLUÍDA!");
		operacaoConcluida.setFont(new Font(font.getName(), font.getStyle(), font.getSize()-5));
		operacaoConcluida.setHorizontalAlignment(SwingConstants.CENTER);
		operacaoConcluida.setVerticalAlignment(SwingConstants.TOP);
		
		JLabel paraImprimir = new JLabel("PARA IMPRIMIR O SEU");
		paraImprimir.setFont(new Font(font.getName(), font.getStyle(), font.getSize()-5));
		paraImprimir.setHorizontalAlignment(SwingConstants.CENTER);
		paraImprimir.setVerticalAlignment(SwingConstants.BOTTOM);
		
		JLabel comprovanteTecle5 = new JLabel("COMPROVANTE TECLE '5'.");
		comprovanteTecle5.setFont(new Font(font.getName(), font.getStyle(), font.getSize()-5));
		comprovanteTecle5.setHorizontalAlignment(SwingConstants.CENTER);
		comprovanteTecle5.setVerticalAlignment(SwingConstants.TOP);
		
		painelCentral.add(operacaoConcluida);
		painelCentral.add(paraImprimir);
		painelCentral.add(comprovanteTecle5);
		
		termino.setFont(font);
		termino.setHorizontalAlignment(SwingConstants.CENTER);
		
		
		//Juntando
		JPanel painelCentralPrincipal = new JPanel();
		painelCentralPrincipal.setLayout(new GridLayout(1, 1));
		painelCentralPrincipal.add(painelCentral);
		
		//North inserido para dar espa�o com o limite superior da tela
		this.add(new Panel(new GridLayout(2, 1, 0, 50)), BorderLayout.NORTH);
		this.add(painelCentralPrincipal, BorderLayout.CENTER);
		
	}
}
